![]() |
ALMaSS
1.0
The Animal, Landscape and Man Simulation System
|
#include <Roe_all.h>
Public Member Functions | |
int | SupplyIsPregnant () |
int | SupplyYoung () |
void | Init (void) |
virtual void | BeginStep (void) |
virtual void | Step (void) |
virtual void | EndStep (void) |
virtual void | On_IsDead (Roe_Base *Someone, int whos_dead, bool fawn) |
bool | On_InitCare (Roe_Fawn *Fawn) |
void | On_EndCare (Roe_Fawn *Fawn) |
int | SupplyGroupNo () |
void | AddFawnToList (Roe_Fawn *fawn) |
Roe_Female (int x, int y, int size, int age, int group, Roe_Female *mum, Landscape *L, RoeDeer_Population_Manager *RPM) | |
virtual | ~Roe_Female () |
![]() | |
Roe_Adult_Base (int x, int y, int size, int age, Landscape *L, RoeDeer_Population_Manager *RPM) | |
virtual | ~Roe_Adult_Base () |
![]() | |
unsigned | IsAlive () |
int | SupplyReserves () |
virtual void | On_MumAbandon (Roe_Female *) |
virtual void | Send_IsDead () |
virtual void | On_ChangeGroup (int) |
RoeDeerInfo | SupplyInfo () |
virtual int | WhatState () |
Roe_Base (int x, int y, Landscape *L, RoeDeer_Population_Manager *RPM) | |
virtual | ~Roe_Base () |
![]() | |
unsigned | SupplyFarmOwnerRef () |
AnimalPosition | SupplyPosition () |
APoint | SupplyPoint () |
int | SupplyPolygonRef () |
int | Supply_m_Location_x () |
int | Supply_m_Location_y () |
virtual void | KillThis () |
virtual void | CopyMyself () |
void | SetX (int a_x) |
void | SetY (int a_y) |
TAnimal (int x, int y, Landscape *L) | |
virtual void | ReinitialiseObject (int x, int y, Landscape *L) |
Used to re-use an object - must be implemented in descendent classes. More... | |
virtual void | Dying () |
void | CheckManagement (void) |
void | CheckManagementXY (int x, int y) |
virtual bool | OnFarmEvent (FarmToDo) |
![]() | |
int | GetCurrentStateNo () |
Returns the current state number. More... | |
void | SetCurrentStateNo (int a_num) |
Sets the current state number. More... | |
bool | GetStepDone () |
Returns the step done indicator flag. More... | |
void | SetStepDone (bool a_bool) |
Sets the step done indicator flag. More... | |
virtual void | ReinitialiseObject () |
Used to re-use an object - must be implemented in descendent classes. More... | |
TALMaSSObject () | |
The constructor for TALMaSSObject. More... | |
virtual | ~TALMaSSObject () |
The destructor for TALMaSSObject. More... | |
void | OnArrayBoundsError () |
Used for debugging only, tests basic object properties. More... | |
Public Attributes | |
Roe_Base * | m_MyYoung [20] |
int | m_MinInState [12] |
int | m_MyGroup |
![]() | |
TRoeDeerStates | CurrentRState |
RoeDeer_Population_Manager * | m_OurPopulation |
int | m_Age |
int | m_Size |
int | m_RangeCentre_x |
int | m_RangeCentre_y |
int | m_Reserves |
double | m_HomeRange |
int | m_OldRange_x |
int | m_OldRange_y |
int | m_SearchRange |
bool | m_float |
bool | m_Disperse |
bool | m_HaveRange |
Roe_Female * | Mum |
int | m_ID |
int | m_FixlistNumber |
bool | m_Sex |
bool | m_IsDead |
unsigned | Alive |
Protected Member Functions | |
int | On_CanJoinGroup (Roe_Female *Female) |
void | On_UpdateGroup (int p_group_x, int p_group_y) |
void | On_ApproachOfDanger (int p_To_x, int p_To_y) |
void | Send_EndGroup () |
virtual void | On_EndGroup () |
![]() | |
bool | Running (int x, int y) |
void | Ignore (int p_To_x, int p_To_y) |
int | DistanceTo (int p_x, int p_y, int p_To_x, int p_To_y) |
int | DistanceToCC (int p_x, int p_y, int p_To_x, int p_To_y) |
int | DirectionTo (int p_x, int p_y, int p_To_x, int p_To_y) |
int | DirectionToCC (int p_x, int p_y, int p_To_x, int p_To_y) |
int | NextStep (int weight, int dir, int recurselevel) |
int | AssessHabitat (int polyref) |
int | AssessHabitat (int p_x, int p_y) |
int | LegalHabitat (int p_x, int p_y) |
int | LegalHabitatCC (int p_x, int p_y) |
int | Cover (int polyref) |
Calls the cover calculation for a given polyref. More... | |
int | Cover (int p_x, int p_y) |
Calls the cover calculation for a given x,y location. More... | |
int | CalcCover (TTypesOfLandscapeElement a_ele, int a_poly) |
The cover calculation for a given element type. More... | |
int | CoverCC (int p_x, int p_y) |
int | NutriValue (int polyref) |
int | NutriValue (int p_x, int p_y) |
int | NutriValueCC (int p_x, int p_y) |
int | Feeding (bool p_Disperse) |
void | SeekCover (int threshold) |
void | SeekNutri (int p_threshold) |
int | ProbRoadCross (int p_x, int p_y, int p_width) |
double | CalculateRoadMortality (int p_x, int p_y, int p_width) |
void | WalkTo (int pos_x, int pos_y) |
void | WalkToCC (int pos_x, int pos_y) |
![]() | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Private Member Functions | |
int | FOnMature (void) |
int | FDie (void) |
int | FDisperse (void) |
int | FEstablishRange (void) |
int | FOnNewDay (void) |
int | FUpdateGestation (void) |
int | FGiveBirth (void) |
int | FFormGroup (void) |
int | FInHeat (void) |
int | FFeed (void) |
int | FRun () |
int | FRecover (void) |
int | FEvade () |
int | FIgnore () |
int | FRuminate (void) |
int | FCareForYoung (void) |
int | FMate (void) |
int | FUpdateEnergy (void) |
Roe_Female::Roe_Female | ( | int | x, |
int | y, | ||
int | size, | ||
int | age, | ||
int | group, | ||
Roe_Female * | mum, | ||
Landscape * | L, | ||
RoeDeer_Population_Manager * | RPM | ||
) |
Roe_Female::Roe_Female - constructor for female object. Sets all attributes and creates groups for 1st generation roes. It also removes a matured fawn from group and adds it as adult female. It also adds fawns to mother's offspring list. Calls CreateNewGroup(), AddToGroup().
References RoeDeer_Population_Manager::AddToGroup(), RoeDeer_Population_Manager::CreateNewGroup(), Roe_Base::IsAlive(), Roe_Base::m_Age, m_Care, m_DaysSinceParturition, m_Gestationdays, m_GroupUpdated, m_HaveGroup, Roe_Base::m_HaveRange, m_HeatCount, Roe_Base::m_IsDead, Roe_Base::m_LastState, m_MinInState, m_My_Mate, m_MyGroup, m_MyYoung, m_NatalGroup, m_NoOfYoung, m_OptGroupSize, TAnimal::m_OurLandscape, Roe_Base::m_OurPopulation, m_Pregnant, Roe_Base::m_Reserves, Roe_Base::m_Sex, Roe_Base::m_Size, m_WasInHeat, Roe_Base::Mum, random(), and Landscape::Warn().
|
virtual |
References Roe_Base::m_float, m_MyGroup, m_MyYoung, Roe_Base::m_OurPopulation, and RoeDeer_Population_Manager::RemoveFromGroup().
void Roe_Female::AddFawnToList | ( | Roe_Fawn * | fawn | ) |
Roe_Female::AddFawnToList - adds fawns to offfspring list of female object. Calls AddToGroup().
References RoeDeer_Population_Manager::AddToGroup(), m_MyGroup, m_MyYoung, and Roe_Base::m_OurPopulation.
Referenced by RoeDeer_Population_Manager::CreateObjects().
|
virtual |
Roe_Female::BeginStep - checks if female object is dead
Reimplemented from Roe_Adult_Base.
References Roe_Base::IsAlive(), TAnimal::m_OurLandscape, and Landscape::Warn().
|
virtual |
Roe_Female::EndStep - checks if female object is dead and adds to number of timesteps. If 1 whole day has passed, current state is set to FOnNewDay
Reimplemented from Roe_Adult_Base.
References Roe_Base::CurrentRState, Roe_Base::IsAlive(), TAnimal::m_OurLandscape, Roe_Base::m_OurPopulation, Roe_Base::m_weightedstep, rds_FDeathState, rds_FOnNewDay, RoeDeer_Population_Manager::StepCounter, Roe_Base::timestep, and Landscape::Warn().
|
private |
Roe_Female::FCareForYoung - sets female object to be in care for young state. Care periods are initiated by message from fawn to mother. Fawn keeps counter of minuts care (=suckling) per hour. If counter drops below min value fawn initiates extra care period. If care is done returns to feeding.
References Roe_Base::IsAlive(), m_Care, m_MinInState, TAnimal::m_OurLandscape, and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FDie - function for managing death of a female object. The female object sends message to offspring list and removes herself from group list. If attended by male when dying, she sends message to this male as well. The fixlist of the female object is emptied and the female furthermore adds itself to list of dead animals. Function returns dead state. Calls functions RemoveFixList()and On_IsDead().
References RoeDeer_Population_Manager::DeadList, Roe_Base::IsAlive(), Roe_Base::m_Age, TALMaSSObject::m_CurrentStateNo, Roe_Base::m_FixlistNumber, m_My_Mate, m_MyYoung, TAnimal::m_OurLandscape, Roe_Base::m_OurPopulation, Roe_Base::Mum, Roe_Base::On_IsDead(), On_IsDead(), Roe_Male::On_IsDead(), RoeDeer_Population_Manager::RemoveFixList(), and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::MDisperse - models dispersal state of female objects. Sets state to dispersal. It then keeps track of amount of time in the dispersal state and calculate probability of switching to feeding, keep dispersing, or dying if spending too long in dispersal state.Calls functions DirectionTo() and NextStep().
References Roe_Base::DirectionTo(), Roe_Base::IsAlive(), Roe_Adult_Base::m_DispCount, Roe_Base::m_Disperse, Roe_Base::m_HaveRange, Roe_Base::m_LastState, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MinInState, Roe_Base::m_OldRange_x, Roe_Base::m_OldRange_y, TAnimal::m_OurLandscape, Roe_Base::m_RangeCentre_x, Roe_Base::m_RangeCentre_y, Roe_Base::NextStep(), random(), and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FEstablishRange - sets up range for female object. Sets object to not be a disperser or to have completed dispersal. Checks if object has a group and if not, assign it to a group. Makes sure that range centre is not too close to road or houses and sets a range center. When new range is set, calculate optimal group size in range based on % forest Always returns state feed. Calls functions CreateNewGroup(), SupplyElementType(), DistanceTo(), PercentForest().
References Landscape::CorrectCoords(), RoeDeer_Population_Manager::CreateNewGroup(), Roe_Base::DistanceTo(), Roe_Base::DistanceToCC(), Roe_Base::IsAlive(), Roe_Base::LegalHabitat(), Roe_Base::LegalHabitatCC(), Roe_Adult_Base::m_DispCount, Roe_Base::m_Disperse, Roe_Base::m_float, Roe_Base::m_HaveRange, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MinInState, m_MyGroup, Roe_Base::m_OldRange_x, Roe_Base::m_OldRange_y, m_OptGroupSize, TAnimal::m_OurLandscape, Roe_Base::m_OurPopulation, Roe_Base::m_RangeCentre_x, Roe_Base::m_RangeCentre_y, Roe_Base::m_SearchRange, RoeDeer_Population_Manager::PercentForest(), random(), Roe_Base::SimH, Roe_Base::SimW, Landscape::SupplyElementType(), tole_ActivePit, tole_Garden, tole_Railway, tole_Track, Vector_x, Vector_y, and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FEvade - checks direction to threath and takes 50 steps in opposite direction. Returns to same state as before disturbance. Calls DirectionTo(), NextStep()
References Roe_Base::DirectionTo(), Roe_Base::IsAlive(), Roe_Base::m_danger_x, Roe_Base::m_danger_y, Roe_Base::m_LastState, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MinInState, TAnimal::m_OurLandscape, Roe_Base::NextStep(), and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FFeed - Models feeding of female object, including energy budget and search for better feeding area. Also determines need to ruminate. In theory a roe deer can spend time in more than 1 type of habitat within 1 timestep. For the energy budget only the habitat type where roe deer is at the beginning of each time step is recorded. Need to keep counter of minutes in feed since the end of last ruminating period (m_FeedCount) to know when to return to ruminate. Returns values for dispersal, ruminate or keep feeding (or die). Calls function NutriValue()
References Roe_Base::Feeding(), IntakeRate, Roe_Base::IsAlive(), Roe_Base::m_Disperse, Roe_Base::m_EnergyGained, Roe_Base::m_FeedCount, Roe_Base::m_IsDead, Roe_Base::m_LastState, Roe_Base::m_LengthFeedPeriod, Roe_Base::m_LengthRuminate, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MinInState, TAnimal::m_OurLandscape, MinNutri, Roe_Base::NutriValue(), random(), Roe_Base::SeekNutri(), Landscape::SupplyMonth(), and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FFormGroup - Function for formation of female group. All deer in groups of size less than optimum, will ask around for group sizes of other groups. If closer to optimum than their own, they can change groups. If this is the case a roe has to add itself to new group, remove itself from old group and message this years fawns about new group. The roe gets a list of females within a certatin range of the roe location then send message to all these females that they can join group. The roe then evaluate answers and decide whether to change group. A new group needs to be larger than old group but still <=optimal group size. Once in a group oldes female in group is found and the range centre of this female serves as group range center. Returns update energy. Calls Supply_GroupSize(), SupplyFemales(), On_CanJoinGroup(), SupplyGroupNo(), RemoveFromGroup(), AddToGroup(), SupplyInfo() On_ChangeGroup(), Supply_RoeGroup(), On_UpdateGroup()
References RoeDeer_Population_Manager::AddToGroup(), Roe_Base::IsAlive(), RoeDeerInfo::m_Age, Roe_Base::m_Disperse, m_GroupUpdated, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MyGroup, m_MyYoung, m_NatalGroup, m_NoOfYoung, m_OptGroupSize, TAnimal::m_OurLandscape, Roe_Base::m_OurPopulation, RoeDeerInfo::m_Range_x, RoeDeerInfo::m_Range_y, Roe_Base::m_SearchRange, m_WantGroup, Roe_Base::On_ChangeGroup(), RoeDeer_Population_Manager::RemoveFromGroup(), RoeDeer_Population_Manager::Supply_GroupSize(), RoeDeer_Population_Manager::Supply_RoeGroup(), RoeDeer_Population_Manager::SupplyFemales(), Roe_Base::SupplyInfo(), and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FGiveBirth - Function for female object giving birth to fawns. Litter size is related to maternal weight, Littersize=0.15*W - 0.68, where 'W'=maternal weight in kg. After litter size has been calculated, the corresponding number of fawn objects are created. Fawns are randomly assinged sex (50:50), sizes of fawn are calculated (int)((pow(((float)m_Size*0.001),0.9)*0.166)*1000); //Oftedal 1985, mum is assigned and fawns are added to mother's offspring list and group list. Calls CreateObjects().
References RoeDeer_Population_Manager::CreateObjects(), Deer_struct::group, Deer_struct::ID, Roe_Base::IsAlive(), m_DaysSinceParturition, m_Gestationdays, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MinInState, m_MyGroup, m_NoOfYoung, TAnimal::m_OurLandscape, Roe_Base::m_OurPopulation, m_Pregnant, Roe_Base::m_Size, Deer_struct::mum, Deer_struct::Pop, prop_femalefawns, random(), Deer_struct::sex, Deer_struct::size, Landscape::Warn(), Deer_struct::x, and Deer_struct::y.
Referenced by Step().
|
private |
Roe_Female::FIgnore - Ignore threath and 1 to time spend in this state. Return to same state as before disturbance
References Roe_Base::IsAlive(), Roe_Base::m_LastState, m_MinInState, TAnimal::m_OurLandscape, and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FInHeat - sets female object to be in heat. Female object Start new day in this state and stays here until it has found at mate or heat is over. Female heat lasts for 3 days. The female will get a list of all males in area and send them a message. If no males are around, the female will search a larger area. If find a male that will mate and is close enough to attend, male list will be deleted and this particular male is set as the female's mate. Calls SupplyMales(), On_InHeat().
References Roe_Base::IsAlive(), m_HeatCount, Roe_Base::m_LastState, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MinInState, m_My_Mate, TAnimal::m_OurLandscape, Roe_Base::m_OurPopulation, Roe_Base::m_SearchRange, RoeDeer_Population_Manager::SupplyMales(), and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FMate - sets female object to be pregnant and sets gestation days to be zero. Also, function stops female from being attended by male. Female returns to same state as before OnNewDay.
References Roe_Base::IsAlive(), m_Gestationdays, Roe_Base::m_LastState, m_MinInState, m_My_Mate, TAnimal::m_OurLandscape, m_Pregnant, and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FOnMature - Checks if area is good enough to establish range. The function ScanGrid() adds the quality values stored in m_grid starting with a minimum area of 400 x 400 m. If not sufficient it extends outwards in all directions until max range is reached (800 x 800 m). It also checks if amount of other females nearby is below a female density threshold. It returns the size of the resulting area if good enough and 0 if not good enough. Calls ScanGrid(), SupplyFemaleRC().
References FemaleDensityThreshold, Roe_Base::IsAlive(), TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Roe_Base::m_OurPopulation, Roe_Base::m_SearchRange, RoeDeer_Population_Manager::ScanGrid(), and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FOnNewDay - updates age of female object (+ 1 day), decides if life expectancy has been reached, which depends on age (Floaters have a higher mortality (added FloatMort)). Checks whether dispersers and floaters can set up range by checking habitat and closeness to mothers range and amount of males already in the area. If failed to find a range before october 1st become a floater. Also governs whether to dissolve or stay in female group - dissolvement dependent on date. If dissolved group, sends female back to old range. Returns values to set the following states: establish range, Form group, update energy (and die). Calls functions DistanceTo(), ScanGrid(), SupplyFemaleRC(), RemoveFromGroup().
References Roe_Base::DistanceTo(), FemaleDensityThreshold, FemaleDMR, FloatMort, Roe_Base::IsAlive(), Roe_Base::m_Age, Roe_Adult_Base::m_DestinationDecided, Roe_Base::m_Disperse, Roe_Base::m_float, Roe_Adult_Base::m_float_x, Roe_Adult_Base::m_float_y, m_GroupUpdated, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MyGroup, Roe_Adult_Base::m_NewState, Roe_Base::m_OldRange_x, Roe_Base::m_OldRange_y, TAnimal::m_OurLandscape, Roe_Base::m_OurPopulation, Roe_Base::m_RangeCentre_x, Roe_Base::m_RangeCentre_y, Roe_Base::m_SearchRange, MinDispDistance, random(), RoeDeer_Population_Manager::RemoveFromGroup(), RoeDeer_Population_Manager::ScanGrid(), Send_EndGroup(), Landscape::SupplyDayInYear(), and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FRecover - Governs recovery after running from danger. Function counts amount of time in state during the present period of recovovery (m_RecovCount) and sets this to 0 when state is left. Female only transfers to this state if safe, whichs means in good habitat. Returns states: feeding, recovery.
References AverageRecoveryTime, Roe_Base::IsAlive(), Roe_Base::m_FeedCount, Roe_Base::m_LastState, m_MinInState, TAnimal::m_OurLandscape, Roe_Base::m_RecovCount, MaxRecoveryTime, random(), and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FRuminate - Function for ruminating. Checks for got spot to rest and amount of time spent ruminating. Ruminate activity cannot be seperated from other kinds of inactivity. It is also assumed that ruminating takes place while recovering after disturbance. Need to count amount of time spend in this state during this period of ruminating and in total last 24 hrs. Returns values for either stay ruminating, feed or dispersal (or die).Calls function Cover().
References Roe_Base::Cover(), CoverThreshold1, CoverThreshold2, Roe_Base::IsAlive(), Roe_Base::m_Disperse, Roe_Base::m_IsDead, Roe_Base::m_LastState, Roe_Base::m_LengthRuminate, TAnimal::m_Location_x, TAnimal::m_Location_y, m_MinInState, TAnimal::m_OurLandscape, Roe_Base::m_RumiCount, random(), Roe_Base::SeekCover(), Landscape::SupplyMonth(), and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FRun - Sets the female object to be in a running state - and checks if safe after 1 time step in this state. Calls Running().
References Roe_Base::IsAlive(), Roe_Base::m_danger_x, Roe_Base::m_danger_y, Roe_Base::m_IsDead, m_MinInState, TAnimal::m_OurLandscape, Roe_Base::m_RecovCount, Roe_Base::Running(), and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FUpdateEnergy - Calculates how much energy is used (in cal/minute) in different activities. Calculates net energy (gained-used) and determines whether excess enery is added to reserves or is used to put on weight. A negative net energy causes the female object to loose weight - if roe deer weight falls below a minimum value, the deer will die. If the roe deer is in very bad condition, the female may abandon fawns and increase forage time. returns states such as feed, update gestation or die.
References Anabolic_Inv, Catabolic_Inv, CostFemaleAct, Female_FeedBouts, FemaleRMR, Roe_Base::IsAlive(), Roe_Base::m_Age, m_DaysSinceParturition, Roe_Adult_Base::m_DestinationDecided, Roe_Base::m_EnergyGained, m_Gestationdays, Roe_Base::m_LengthFeedPeriod, m_MinInState, m_MyYoung, Roe_Adult_Base::m_NewState, m_NoOfYoung, TAnimal::m_OurLandscape, m_Pregnant, Roe_Base::m_Reserves, Roe_Base::m_Size, Roe_Base::On_MumAbandon(), Landscape::SupplyMonth(), and Landscape::Warn().
Referenced by Step().
|
private |
Roe_Female::FUpdateGestation - Checks if it is time to give birth if pregnant. Controls taking care of young, mating, the probability of going into heat (dependent on age and time of year). Returns states giveBirth, inHeat, CareFOrYoung or mate.
References GestationPeriod, Roe_Base::IsAlive(), Roe_Base::m_Age, m_DaysSinceParturition, Roe_Adult_Base::m_DestinationDecided, m_Gestationdays, Roe_Base::m_HaveRange, Roe_Base::m_LastState, m_My_Mate, Roe_Adult_Base::m_NewState, TAnimal::m_OurLandscape, m_Pregnant, m_WasInHeat, random(), Landscape::SupplyDayInYear(), and Landscape::Warn().
Referenced by Step().
void Roe_Female::Init | ( | void | ) |
|
protected |
Roe_Female::On_ApproachOfDanger - Determines whether to run or evade a threat depending on cover and distance to threath. In good cover, female will run if threath is less than 30 m away and else perform evasive behavior, In intermediate cover the flight distance is 50 m, and in poor cover it is 70 m. Returns states evade or run. Calls Cover(), DistanceTo().
References Roe_Base::Cover(), CoverThreshold1, CoverThreshold2, Roe_Base::CurrentRState, Roe_Base::DistanceTo(), Roe_Base::m_danger_x, Roe_Base::m_danger_y, TAnimal::m_Location_x, TAnimal::m_Location_y, rds_FEvade, and rds_FRun.
|
protected |
Roe_Female::On_CanJoinGroup - Called by female object, and evaluates whether a new female (found by searching for all females withing a range of the calling females location) can join a female group or not. Returns an int >0 if new roe can join group, returns 0 if roe cannot join. First makes sure that new female is not a floater, since floaters cannot have a group. Then looks at new females current group size and whether or not the new female is the calling female's mother. If so, function returns group size. If new female does not have group function returns 1. If new female has group, function checks if this group size is less than optimal group size andd returns group size if so and 0 otherwise (cannot have larger group than optimum group size) Calls Supply_GroupSize()
References Roe_Base::m_float, m_HaveGroup, m_MyGroup, m_MyYoung, m_OptGroupSize, Roe_Base::m_OurPopulation, and RoeDeer_Population_Manager::Supply_GroupSize().
void Roe_Female::On_EndCare | ( | Roe_Fawn * | Fawn | ) |
Roe_Female::On_EndCare - Fawn ends it's care period - returns false.
References Roe_Base::CurrentRState, m_Care, and rds_FFeed.
Referenced by Roe_Fawn::FASuckle().
|
protectedvirtual |
Roe_Female::On_EndGroup - after group is dissolved this function sets range centers to old individual centers.
Reimplemented from Roe_Base.
References m_GroupUpdated, Roe_Base::m_OldRange_x, Roe_Base::m_OldRange_y, Roe_Base::m_RangeCentre_x, and Roe_Base::m_RangeCentre_y.
bool Roe_Female::On_InitCare | ( | Roe_Fawn * | Fawn | ) |
Roe_Female::On_InitCare - Returns true if female objects allows fawn to feed (if her reserves are > 0) otherwise it returns false.
References Roe_Base::CurrentRState, m_Care, RoeDeer_Population_Manager::m_CriticalWeight_Females, Roe_Base::m_OurPopulation, Roe_Base::m_Size, rds_FCareForYoung, and rds_FFeed.
Referenced by Roe_Fawn::FAFeed(), Roe_Fawn::FAHide(), Roe_Fawn::FARecover(), Roe_Fawn::FASuckle(), and Roe_Fawn::Send_InitCare().
|
virtual |
Roe_Female::On_IsDead - governs a female objects "response" to death of another object. Checks who is dead (mom, female, mate) and sets them to NULL. If mother is dead, the "responding" female object deletes pointer to mom. If mate is dead, the female will go back into heat. If offspring is dead (both fawns and adults), they will be removed from offspring list.
Reimplemented from Roe_Base.
References Roe_Base::CurrentRState, Roe_Base::IsAlive(), m_My_Mate, m_MyYoung, m_NoOfYoung, TAnimal::m_OurLandscape, Roe_Base::Mum, rds_FInHeat, and Landscape::Warn().
Referenced by Roe_Fawn::FADie(), FDie(), and Roe_Male::MDie().
|
protectedvirtual |
Roe_Female::On_UpdateGroup - updates group status by changing range center to that of group while storing old range center for when ghroup is dissolved and roe needs to go back to own range.
Reimplemented from Roe_Base.
References m_GroupUpdated, Roe_Base::m_OldRange_x, Roe_Base::m_OldRange_y, Roe_Base::m_RangeCentre_x, and Roe_Base::m_RangeCentre_y.
|
protected |
Roe_Female::Send_EndGroup - calls to dissolve female group. Calls Supply_RoeGroup(), On_EndGroup()
References Roe_Base::IsAlive(), m_MyGroup, TAnimal::m_OurLandscape, Roe_Base::m_OurPopulation, RoeDeer_Population_Manager::Supply_RoeGroup(), and Landscape::Warn().
Referenced by FOnNewDay().
|
virtual |
Roe_Female::Step - function called every time step. The functions checks if done with a given state (m_StepDone) and governs states and transitions to other states. Calls functions: FOnMature(), FDie(), FOnNewDay(), FUpdateGestation(),FMate(), FFormGroup(), FGiveBirth(), FEstablishRange(), FDisperse(), FFeed(), FRecover(), FRUn(), FEvade(), FIgnore(), FRuminate, FCareForYoung(), FUpdateEnergy(), FInHeat().
Reimplemented from Roe_Adult_Base.
References Roe_Base::CurrentRState, FCareForYoung(), FDie(), FDisperse(), FEstablishRange(), FEvade(), FFeed(), FFormGroup(), FGiveBirth(), FIgnore(), FInHeat(), FMate(), FOnMature(), FOnNewDay(), FRecover(), FRuminate(), FRun(), FUpdateEnergy(), FUpdateGestation(), Roe_Base::IsAlive(), TAnimal::m_OurLandscape, TALMaSSObject::m_StepDone, rds_FCareForYoung, rds_FDeathState, rds_FDie, rds_FDisperse, rds_FEstablishRange, rds_FEvade, rds_FFeed, rds_FFormGroup, rds_FGiveBirth, rds_FIgnore, rds_FInHeat, rds_FMate, rds_FOnMature, rds_FOnNewDay, rds_FRecover, rds_FRuminate, rds_FRun, rds_FUpdateEnergy, rds_FUpdateGestation, rds_Initialise, and Landscape::Warn().
|
inline |
|
inline |
|
inline |
|
protected |
Referenced by FCareForYoung(), On_EndCare(), On_InitCare(), and Roe_Female().
|
protected |
Referenced by FGiveBirth(), FUpdateEnergy(), FUpdateGestation(), and Roe_Female().
|
protected |
Referenced by FGiveBirth(), FMate(), FUpdateEnergy(), FUpdateGestation(), and Roe_Female().
|
protected |
|
protected |
Referenced by FFormGroup(), FOnNewDay(), On_EndGroup(), On_UpdateGroup(), and Roe_Female().
|
protected |
Referenced by On_CanJoinGroup(), and Roe_Female().
|
protected |
Referenced by FInHeat(), and Roe_Female().
int Roe_Female::m_MinInState[12] |
Referenced by FCareForYoung(), FDisperse(), FEstablishRange(), FEvade(), FFeed(), FGiveBirth(), FIgnore(), FInHeat(), FMate(), FRecover(), FRuminate(), FRun(), FUpdateEnergy(), and Roe_Female().
|
protected |
Referenced by FDie(), FInHeat(), FMate(), FUpdateGestation(), On_IsDead(), and Roe_Female().
int Roe_Female::m_MyGroup |
Referenced by AddFawnToList(), FEstablishRange(), FFormGroup(), FGiveBirth(), FOnNewDay(), On_CanJoinGroup(), Roe_Female(), Send_EndGroup(), and ~Roe_Female().
Roe_Base* Roe_Female::m_MyYoung[20] |
Referenced by AddFawnToList(), Roe_Fawn::FAInit(), FDie(), FFormGroup(), FUpdateEnergy(), On_CanJoinGroup(), On_IsDead(), Roe_Female(), Roe_Male::Roe_Male(), and ~Roe_Female().
|
protected |
Referenced by FFormGroup(), and Roe_Female().
|
protected |
Referenced by FFormGroup(), FGiveBirth(), FUpdateEnergy(), On_IsDead(), and Roe_Female().
|
protected |
Referenced by FEstablishRange(), FFormGroup(), On_CanJoinGroup(), and Roe_Female().
|
protected |
Referenced by FGiveBirth(), FMate(), FUpdateEnergy(), FUpdateGestation(), and Roe_Female().
|
protected |
Referenced by FFormGroup().
|
protected |
Referenced by FUpdateGestation(), and Roe_Female().